#' @param max_iter The maximum number of iterations to use.
